<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">


  <link rel="apple-touch-icon" sizes="180x180" href="https://www.wulihub.com.cn/gc/Wez0VG/images/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-16x16.png">
  <link rel="mask-icon" href="https://www.wulihub.com.cn/gc/Wez0VG/images/logo.svg" color="#222">

<link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/main.css">



<link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free@6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://npm.elemecdn.com/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"nobige.cn","root":"/","images":"https://www.wulihub.com.cn/gc/Wez0VG/images","scheme":"Gemini","darkmode":false,"version":"8.12.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/config.js"></script>

    <meta name="description" content="​	之前写过一篇《给hexo添加Valine评论功能》，但是站长收到评论没有通知，导致有访客有所评论都未能及时回复，变成了单向的个人博客，我的小天地，在昨晚一次机缘巧合下摸索到了新的方法，不仅仅支持有人评论，站长有通知，还可以管理评论，甚至可以拦截广告，垃圾评论等。 以下教程是建立在已由Valine评论的基础上完成的，若是没有安装Valine评论可以产考《给hexo添加Valine评论功能》或是官">
<meta property="og:type" content="article">
<meta property="og:title" content="Valine-Admin评论系统部署">
<meta property="og:url" content="https://nobige.cn/post/20190410-Valine-AdminDeployment/index.html">
<meta property="og:site_name" content="NoBige-JackCh3n">
<meta property="og:description" content="​	之前写过一篇《给hexo添加Valine评论功能》，但是站长收到评论没有通知，导致有访客有所评论都未能及时回复，变成了单向的个人博客，我的小天地，在昨晚一次机缘巧合下摸索到了新的方法，不仅仅支持有人评论，站长有通知，还可以管理评论，甚至可以拦截广告，垃圾评论等。 以下教程是建立在已由Valine评论的基础上完成的，若是没有安装Valine评论可以产考《给hexo添加Valine评论功能》或是官">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-47-28-615.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-51-41-134.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-55-42-790.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-33-59-971.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-58-44-54.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-48-07-214.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-44-32-95.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-44-46-575.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-45-11-885.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-17-08-466.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-20-12-200.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-41-06-8.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-41-25-936.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-28-18-790.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-29-03-992.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-23-23-720.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-06-04-20-48-57-562.jpg">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-06-04-20-50-06-955.jpg">
<meta property="article:published_time" content="2019-04-10T04:53:18.000Z">
<meta property="article:modified_time" content="2024-11-07T02:59:06.234Z">
<meta property="article:author" content="JackCh3n">
<meta property="article:tag" content="hexo">
<meta property="article:tag" content="valine">
<meta property="article:tag" content="部署">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-47-28-615.jpg">


<link rel="canonical" href="https://nobige.cn/post/20190410-Valine-AdminDeployment/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"en","comments":true,"permalink":"https://nobige.cn/post/20190410-Valine-AdminDeployment/","path":"post/20190410-Valine-AdminDeployment/","title":"Valine-Admin评论系统部署"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>Valine-Admin评论系统部署 | NoBige-JackCh3n</title>
  
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"UA-122817633-1","only_pageview":true}</script>
  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/google-analytics.js"></script>

  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?96741f92c07d010c0ddd1d02197893e2"></script>




  <noscript>
    <link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">NoBige-JackCh3n</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">copy to my blog</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>Home</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="user fa-fw"></i>About</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="tags fa-fw"></i>Tags</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="th fa-fw"></i>Categories</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="archive fa-fw"></i>Archives</a></li><li class="menu-item menu-item-sitemap"><a href="/sitemap.xml" rel="section"><i class="sitemap fa-fw"></i>Sitemap</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>Search
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="Searching..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Valine-Admin"><span class="nav-number">1.</span> <span class="nav-text">Valine-Admin</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2"><span class="nav-number">2.</span> <span class="nav-text">快速部署</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E5%AF%BC%E5%87%BA"><span class="nav-number">3.</span> <span class="nav-text">数据库导出</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1%E8%AE%BE%E7%BD%AE"><span class="nav-number">4.</span> <span class="nav-text">定时任务设置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%82%AE%E4%BB%B6%E9%80%9A%E7%9F%A5"><span class="nav-number">5.</span> <span class="nav-text">邮件通知</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AF%84%E8%AE%BA%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0"><span class="nav-number">6.</span> <span class="nav-text">评论管理后台</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%A1%B9%E7%9B%AE%E5%9C%B0%E5%9D%80"><span class="nav-number">7.</span> <span class="nav-text">项目地址</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3"><span class="nav-number">8.</span> <span class="nav-text">常见问题解决</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%82%E8%80%83"><span class="nav-number">9.</span> <span class="nav-text">参考</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="JackCh3n"
      src="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
  <p class="site-author-name" itemprop="name">JackCh3n</p>
  <div class="site-description" itemprop="description">Record the pit filling process with words</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">146</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">279</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/jackch3n" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;jackch3n" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
      </span>
  </div>


  <div class="links-of-blogroll site-overview-item animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://vercel.com/?f=nobige" title="https:&#x2F;&#x2F;vercel.com?f&#x3D;nobige" rel="noopener" target="_blank">vercel</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.jsdelivr.com/?f=nobige" title="https:&#x2F;&#x2F;www.jsdelivr.com?f&#x3D;nobige" rel="noopener" target="_blank">jsdelivr</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.upyun.com/?f=nobige" title="https:&#x2F;&#x2F;www.upyun.com?f&#x3D;nobige" rel="noopener" target="_blank">upyun</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://coding.net/?f=nobige" title="https:&#x2F;&#x2F;coding.net?f&#x3D;nobige" rel="noopener" target="_blank">coding</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://unsplash.com/?f=nobige" title="https:&#x2F;&#x2F;unsplash.com?f&#x3D;nobige" rel="noopener" target="_blank">unsplash</a>
        </li>
    </ul>
  </div>

        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="en">
    <link itemprop="mainEntityOfPage" href="https://nobige.cn/post/20190410-Valine-AdminDeployment/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
      <meta itemprop="name" content="JackCh3n">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="NoBige-JackCh3n">
      <meta itemprop="description" content="Record the pit filling process with words">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="Valine-Admin评论系统部署 | NoBige-JackCh3n">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Valine-Admin评论系统部署
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2019-04-10 12:53:18" itemprop="dateCreated datePublished" datetime="2019-04-10T12:53:18+08:00">2019-04-10</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">Edited on</span>
      <time title="Modified: 2024-11-07 10:59:06" itemprop="dateModified" datetime="2024-11-07T10:59:06+08:00">2024-11-07</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">In</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%8A%80%E5%B7%A7/" itemprop="url" rel="index"><span itemprop="name">技巧</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="Views" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">Views: </span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p>​	之前写过一篇《<a href="https://nobige.cn/post/20180725-forHexoAddValine/">给hexo添加Valine评论功能</a>》，但是站长收到评论没有通知，导致有访客有所评论都未能及时回复，变成了单向的个人博客，我的小天地，在昨晚一次机缘巧合下摸索到了新的方法，不仅仅支持有人评论，站长有通知，还可以管理评论，甚至可以拦截广告，垃圾评论等。</p>
<p><strong>以下教程是建立在已由Valine评论的基础上完成的，若是没有安装Valine评论可以产考《<a href="https://nobige.cn/post/20180725-forHexoAddValine/">给hexo添加Valine评论功能</a>》或是官网的使用教程《快速开始》</strong></p>
<h2 id="Valine-Admin"><a href="#Valine-Admin" class="headerlink" title="Valine-Admin"></a>Valine-Admin</h2><blockquote>
<p>Valine Admin 是 Valine 评论系统的扩展和增强，主要实现评论邮件通知、评论管理、垃圾评论过滤等功能。支持完全自定义的邮件通知模板。基于Akismet API实现准确的垃圾评论过滤。此外，使用云函数等技术解决了免费版云引擎休眠问题，支持云引擎自动唤醒，漏发邮件自动补发。兼容云淡风轻及Deserts维护的多版本Valine。</p>
</blockquote>
<h2 id="快速部署"><a href="#快速部署" class="headerlink" title="快速部署"></a>快速部署</h2><p>1.在Leancloud云引擎设置界面，填写代码库并保存：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://github.com/DesertsP/Valine-Admin.git</span><br></pre></td></tr></table></figure>

<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-47-28-615.jpg" alt="Leancloud云引擎设置"></p>
<p>2.在设置页面，设置环境变量以及 Web 二级域名。</p>
<ul>
<li>申请 web 主机域名必须先通过<a href="/go.html?u=https://leancloud.cn/settings.html#/setting/realname">实名认证</a>,审核速速的还是很快的，一个上午就通过了。</li>
</ul>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-51-41-134.jpg" alt="设置环境变量"></p>
<table>
<thead>
<tr>
<th>变量</th>
<th>示例</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>SITE_NAME</td>
<td>Nobige</td>
<td>[必填]博客名称</td>
</tr>
<tr>
<td>SITE_URL</td>
<td><a href="https://nobige.cn/">https://Nobige.cn</a></td>
<td>[必填]首页地址</td>
</tr>
<tr>
<td><strong>SMTP_SERVICE</strong></td>
<td>QQ</td>
<td>[新版支持]邮件服务提供商，支持 QQ、163、126、Gmail 以及 <a href="/go.html?u=https://nodemailer.com/smtp/well-known/#supported-services">更多</a></td>
</tr>
<tr>
<td>SMTP_USER</td>
<td><a href="mailto:xxxxxx@qq.com">xxxxxx@qq.com</a></td>
<td>[必填]SMTP登录用户</td>
</tr>
<tr>
<td>SMTP_PASS</td>
<td>xxxxxxxx</td>
<td>[必填]SMTP登录密码（QQ邮箱需要授权码）</td>
</tr>
<tr>
<td>SENDER_NAME</td>
<td>路人甲</td>
<td>[必填]发件人</td>
</tr>
<tr>
<td>SENDER_EMAIL</td>
<td><a href="mailto:xxxxxx@qq.com">xxxxxx@qq.com</a></td>
<td>[必填]发件邮箱</td>
</tr>
<tr>
<td>ADMIN_URL</td>
<td><a target="_blank" rel="noopener" href="https://xxx.leanapp.cn/">https://xxx.leanapp.cn/</a></td>
<td>[建议]Web主机二级域名，用于自动唤醒</td>
</tr>
<tr>
<td>BLOGGER_EMAIL</td>
<td><a href="mailto:xxxxx@gmail.com">xxxxx@gmail.com</a></td>
<td>[可选]博主通知收件地址，默认使用SENDER_EMAIL</td>
</tr>
<tr>
<td>AKISMET_KEY</td>
<td>xxxxxxxxxxxx</td>
<td>[可选]Akismet Key 用于垃圾评论检测，设为MANUAL_REVIEW开启人工审核，留空不使用反垃圾</td>
</tr>
</tbody></table>
<p><strong>以上必填参数请务必正确设置。</strong></p>
<p>二级域名用于评论后台管理，如<a href="/go.html?u=https://phpMyAdmin.leanapp.cn/">https://phpMyAdmin.leanapp.cn</a> 。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-55-42-790.jpg" alt="设置二级域名"></p>
<p>切换到部署标签页，分支使用master，点击部署即可</p>
<p>第一次部署需要花点时间。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-33-59-971.jpg" alt="部署"></p>
<p>评论管理。访问设置的二级域名<code>https://二级域名.leanapp.cn/sign-up</code>，注册管理员登录信息，如：<a target="_blank" rel="noopener" href="https://phpmyadmin.leanapp.cn/sign-up">https://phpMyAdmin.leanapp.cn/sign-up</a></p>
<h2 id="数据库导出"><a href="#数据库导出" class="headerlink" title="数据库导出"></a>数据库导出</h2><p>如果打开出现的是<strong>Not Found</strong> 则是要删除 数据库**_User** Class所有的数据</p>
<p><strong>删除所有数据</strong></p>
<p>存储 - _User - 其他 - 删除所有数据</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-58-44-54.jpg" alt="删除所有数据"></p>
<p>如果有数据的话可以先导出数据库（没想到我这小破站还是有人访问的，泪流满面）</p>
<p><strong>数据导出</strong></p>
<p>应用设置 - 数据导出 -根据需求导出</p>
<p>本来高高兴兴，但是却说不能导出？？？中午12点后不让导出？？？什么逻辑，真是奇葩。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-48-07-214.jpg" alt="中午12点后不让导出"></p>
<p>习惯性的按起了 Ctrl+Shift+I 看到一个连接，单开一看全是数据，以json的格式提供，大概长这样。若是需要单页显示更多可以在页面上设置，复制保存为json文件，再设置完管理员账号后倒入账号即可。</p>
<p>链接大概长这个样子。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://leancloud.cn/1.1/classes/_User?where=%7B%7D&amp;limit=20&amp;order=-updatedAt</span><br></pre></td></tr></table></figure>

<p><strong>数据导入</strong></p>
<p>​	存储 - 数据 创建Class 右边的三个点  …  - 数据导入 根据自己的情况导入。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-44-32-95.jpg" alt="数据导入"></p>
<p>​	处理数据需要一点点的时间</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-44-46-575.jpg" alt="处理数据"></p>
<p>​	导入成功后会发邮件提醒。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-12-45-11-885.jpg" alt="邮件提醒"></p>
<p>设置完<strong>自定义环境变量</strong>重启实例后就是安装完成了。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-17-08-466.jpg" alt="自定义环境变量"></p>
<p><strong>重启实例</strong></p>
<p>云引擎 - 实例 - 螺母图案 - 重启</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-20-12-200.jpg" alt="重启实例"></p>
<h2 id="定时任务设置"><a href="#定时任务设置" class="headerlink" title="定时任务设置"></a>定时任务设置</h2><p>目前实现了两种云函数定时任务：(1)自动唤醒，定时访问Web APP二级域名防止云引擎休眠；(2)每天定时检查24小时内漏发的邮件通知。</p>
<p>进入云引擎-定时任务中，创建定时器，创建两个定时任务。</p>
<p>选择self-wake云函数，Cron表达式为<code>0 0/30 7-23 * * ?</code>，表示每天早6点到晚23点每隔30分钟访问云引擎，<code>ADMIN_URL</code>环境变量务必设置正确：</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-41-06-8.jpg" alt="防睡眠"></p>
<p>选择resend-mails云函数，Cron表达式为<code>0 0 8 * * ?</code>，表示每天早8点检查过去24小时内漏发的通知邮件并补发：</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-41-25-936.jpg" alt="发邮件"></p>
<p><strong>添加定时器后记得点击启动方可生效</strong></p>
<p><strong>至此，Valine Admin 已经可以正常工作，更多进阶配置。请查看GitHub个人觉得没有什么必要，除非你觉的邮件通知的样式太丑了，或是需要添加 垃圾评论检测</strong></p>
<h2 id="邮件通知"><a href="#邮件通知" class="headerlink" title="邮件通知"></a>邮件通知</h2><p>站长的长个样子</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-13-28-18-790.jpg" alt="站长邮件通知"></p>
<p>评论被回复</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-29-03-992.jpg" alt="评论被回复"></p>
<h2 id="评论管理后台"><a href="#评论管理后台" class="headerlink" title="评论管理后台"></a>评论管理后台</h2><p>​	评论管理后台不知道是不是我这小站评论少的问题，还是压根就没有分页，打开后全部的评论一股脑的加载出来，若是没有图片的话还好，若有图片的话性能差点的电脑可能出现卡死的现象。</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-04-10-14-23-23-720.jpg" alt="评论管理后台"></p>
<h2 id="项目地址"><a href="#项目地址" class="headerlink" title="项目地址"></a>项目地址</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://github.com/DesertsP/Valine-Admin</span><br></pre></td></tr></table></figure>

<h2 id="常见问题解决"><a href="#常见问题解决" class="headerlink" title="常见问题解决"></a>常见问题解决</h2><p>​	2019-6-04补充</p>
<p>​	最近几天收到了关于应用的Email,说是出了故障什么的,但是自从这篇文章写完后很久都没有去管了,今天又收到一位小老弟的Email说是按本文章部署的过程中出现了Not Found的错误,他的操作也是按我上文给出的删除user表,但是没有解决问题,这里稍微的说一下,为什么是删除user表而不是其他的操作?</p>
<p>​	我在现在用Google搜索了一下发现没有相同的案例,唯一一个相关文章还是我所写的就是本文[关键词 Valine-Admin Not Found],其实这句话是官方说明的另一种表达意思,官方是这么说的</p>
<blockquote>
<p>注：使用原版Valine如果遇到注册页面不显示直接跳转至登录页的情况，请手动删除_User表中的全部数据。</p>
</blockquote>
<p>​	而我给那位小老弟的回复是尝试一下实例,who?重启大法好！</p>
<p>2.第二个则是故障在我查了日志后发现是授权码的问题，修改一下，重启实例又可以正常的通知邮件啦！</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-06-04-20-48-57-562.jpg" alt="LeanCloud错误邮件"></p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20190410-Valine-AdminDeployment/xiao2019-06-04-20-50-06-955.jpg" alt="实例日志"></p>
<p>最最重要的是要学会看日志！</p>
<p>最最重要的是要学会看日志！</p>
<p>最最重要的是要学会看日志！</p>
<h2 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h2><p><a href="/go.html?u=https://leancloud.cn/docs/dashboard_guide.html#hash798824956">管理控制台使用指南 - LeanCloud 文档</a></p>
<p><a href="/go.html?u=https://valine.js.org/quickstart.html">快速开始 | Valine</a></p>
<p><a href="/go.html?u=https://github.com/DesertsP/Valine-Admin">DesertsP&#x2F;Valine-Admin: A simple comment system based on LeanCloud and Valine. 👉</a></p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/hexo/" rel="tag"># hexo</a>
              <a href="/tags/valine/" rel="tag"># valine</a>
              <a href="/tags/%E9%83%A8%E7%BD%B2/" rel="tag"># 部署</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/20190409-Composer-SSL-TLS-Problem/" rel="prev" title="Composer-SSL-TLS问题">
                  <i class="fa fa-chevron-left"></i> Composer-SSL-TLS问题
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/20190410-Json-problem/" rel="next" title="Json-problem">
                  Json-problem <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    
  <div class="comments" id="disqus_thread">
    <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
  </div>
  
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JackCh3n</span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="Total Visitors">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="Total Views">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>
    <br/>Powerful CDN service provided by 
  <a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/upyun_logo.png" height="66" style="display: list-item;" alt="upyun"></a> 
  <a target="_blank" rel="noopener" href="https://www.jsdelivr.com" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/jsdelivr_logo.svg" height="50" style="display: list-item;" alt="JsDelivr"></a>
  <p>
  <br/><a target="_blank" rel="noopener" href="https://pages.github.com/?f=nobige">Github Pages</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://vercel.com/?f=nobige">Vercel</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://www.netlify.com/?f=nobige">Netlify</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://coding.net/?f=nobige">coding</a>&nbsp;&nbsp;provides static publishing
  </p>

    </div>
  </footer>

  
  <script src="https://npm.elemecdn.com/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/comments.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/utils.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/motion.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/next-boot.js"></script>

  
<script src="https://npm.elemecdn.com/hexo-generator-searchdb@1.4.0/dist/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/search/local-search.js"></script>





  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<link rel="stylesheet" href="https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqusjs.css" integrity="sha256-GxdCIOyfxQ1OBfS99qAIJDoGK1ADuBsxhMTqXG82fAY=" crossorigin="anonymous">

<script class="next-config" data-name="disqusjs" type="application/json">{"enable":true,"api":"https://duosuo.nobige.cn/","apikey":"Kmo9kPwsir7ppp8tGpeGROCmUtW8tdZBOdBVowPC67xVfTS5uV1wr6s4kckvP95m","shortname":"nobige","js":{"url":"https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqus.js","integrity":"sha256-LVaMHPQ2zLqOc5rXSAfr4d1PIkEGNLyyUTDNPZmTtUw="}}</script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/comments/disqusjs.js"></script>

</body>
</html>
